IProject.AddNewRootModel method ¶
Namespace: NextDesign.Core
Description¶
Adds a new model of the specified class to the project. Instantiation is allowed even if the specified class is an abstract class, and it is added as the last element of the corresponding field. The added model is retained as an element under the project node (directly under the project) displayed on the model navigator. If there are multiple matching classes when fuzzy matching is performed, the first instance of the type compatible class found will be added. Also, it can be added even if the "Can it be placed directly under the project" of the specified class is not checked.
argument¶
Name | Type | Description |
---|---|---|
className | string | Class Name Specify the class name or fully qualified name. Null or empty string cannot be specified. |
fuzzy | bool | className argument as the name of the class instead of the fully qualified name. If False, evaluates as the class whose fully qualified name matches className. If True, evaluate as if the class whose class name matches className is specified. The default value is True. |
Return value¶
Exception¶
Name | Exception Class | Description |
---|---|---|
Invalid argument | ExtensionArgumentException | When null or empty string is specified for className |
Class not found | ExtensionTypeNotFoundException | If the specified class is not found |